import { SET_CHANNELS, SET_ARTICLE_LIST } from '@/store/actionTypes/article'
const initState = {
  channels: []
}

const article = (state = initState, action) => {
  switch (action.type) {
    case SET_CHANNELS:
      return {
        ...state,
        channels: action.payload
      }

    case SET_ARTICLE_LIST:
      return {
        ...state,
        ...action.payload
      }

    default:
      return state
  }
}

export default article
